﻿// ==PREPROCESSOR==
// @import "%fb2k_path%scripts\marc2003\v2\common.js"
// @import "%fb2k_path%scripts\marc2003\v2\tooltip_buttons.js"
// ==/PREPROCESSOR==

var bw = 32;
var bh = 32;
var top_margin = 8;
var left_margin = 8;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var panel_id = window.GetProperty("panel_id", window.id);
var custom_background_file = settings_path + panel_id + "buttons_background";
var custom_background = read(custom_background_file);

Buttons = {
	but1: new Button(left_margin,top_margin,bw,bh, {normal: images_path + "previous.png", hover: images_path + "previous_h.png"}, function(){fb.Prev();}, "Previous"),
    but2: new Button(bw*1.5+ left_margin,top_margin,bw,bh, {normal: images_path + "play.png", hover: images_path + "play_h.png"}, function(){fb.Play();}, "Play,Pause"),
    but3: new Button(bw*3 + left_margin,top_margin,bw,bh, {normal: images_path + "pause.png", hover: images_path + "pause_h.png"}, function(){fb.Pause();}, "Pause"),
    but4: new Button(bw*4.5 + left_margin,top_margin,bw,bh, {normal: images_path + "stop.png", hover: images_path + "stop_h.png"}, function(){fb.Stop();}, "Stop"),
	but5: new Button(bw*6 + left_margin,top_margin,bw,bh, {normal: images_path + "next.png", hover: images_path + "next_h.png"}, function(){fb.Next();}, "Next")
}

function on_size() {
	ww = window.Width;
	wh = window.Height;
}

function on_mouse_rbtn_up(x, y) {
	buttons_menu(x,y);
	return true;
}

function on_paint(gr) {
	buttons_background(gr);
	buttonsDraw(gr);
}